home *** CD-ROM | disk | FTP | other *** search
- /* strcpy.c From TC Bible page 280 Use stpcpy to copy one string to
- another. It returns a pointer to the end of the string. */
-
- #include <stdio.h>
- #include <string.h>
- main()
- {
- char str1[80], str2[80];
- printf("Enter a string: ");
- gets(str2);
- strcpy(str1,str2);
- printf("String copied. Result is: %s\n", str1);
- }
-